<template>
  <div>
    <Header :scrollY="scrollY" />
    <NuxtPage :class="'page-'+store.locale" />
    <Footer />
  </div>
</template>

<script setup>

import {ref,onMounted,onUnmounted} from 'vue'
const store = useStateStore()

let scrollY = ref(0)
const handleScroll = () => {
  // 滚动时的处理逻辑
  scrollY.value = window.scrollY
};


onMounted(()=>{
  window.addEventListener('scroll', handleScroll);
})

onUnmounted(() => {
  window.removeEventListener('scroll', handleScroll);
});

</script>